package com.club.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.club.entity.ActivitySignUp;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

/**
 * 活动报名Mapper接口
 */
@Mapper
public interface ActivitySignUpMapper extends BaseMapper<ActivitySignUp> {
    
    /**
     * 根据活动ID查询报名记录
     */
    List<ActivitySignUp> selectByActivityId(Long activityId);
    
    /**
     * 根据用户ID查询报名记录
     */
    List<ActivitySignUp> selectByUserId(Long userId);
    
    /**
     * 根据活动ID和用户ID查询报名记录
     */
    ActivitySignUp selectByActivityAndUser(Long activityId, Long userId);
    
    /**
     * 根据活动ID和状态统计报名人数
     */
    int countByActivityIdAndStatus(Long activityId, Integer status);
}